﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JXT.PrimaryKey.Batman.Domain.Models
{
    [Serializable]
    public abstract class ValueObjectBase<T> : IValueObject, IEquatable<T>
    {
        public abstract bool Equals(T other);

        public override bool Equals(object obj)
        {
            //return base.Equals(obj);
            if (obj is T)
            {
                return Equals((T) obj);
            }
            return false;
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }
    }
}
